import React,{Component} from 'react';
import {
    PixelRatio,
    Dimensions,
} from 'react-native';

const BASE_WIN_WIDTH = 375;
const BASE_WIN_HEIGHT = 667;

// 适配并返回对应的宽度
export function ScreenWidth(widthData){
	let screenWidth = Dimensions.get('window').width;
	let newData = Math.round( (widthData / 375) * screenWidth );
	return newData;
}

// 适配并返回对应的高度
export function ScreenHeight(heightData){
	let screenHeight = Dimensions.get('window').height;
	let newData = Math.round( (heightData / 667) * screenHeight );
	return newData;
}
